projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd5771f
)
regex-emacs: copy less when reallocating
author
Paul Eggert
<eggert@cs.ucla.edu>
Wed, 26 Aug 2020 07:07:09 +0000
(
00:07
-0700)
committer
Paul Eggert
<eggert@cs.ucla.edu>
Wed, 26 Aug 2020 07:20:31 +0000
(
00:20
-0700)
* src/regex-emacs.c (GROW_FAIL_STACK): Copy just the
occupied stack slots, as the rest are garbage.
src/regex-emacs.c
patch
|
blob
|
history
diff --git
a/src/regex-emacs.c
b/src/regex-emacs.c
index 3d8aaf4bb1350c14e7b89fe01f2f28e7a02732ea..971a5f63749d4cd071de9814395481ef78bdbbef 100644
(file)
--- a/
src/regex-emacs.c
+++ b/
src/regex-emacs.c
@@
-929,7
+929,7
@@
typedef struct
? 0 \
: ((fail_stack).stack \
= REGEX_REALLOCATE ((fail_stack).stack, \
- (fail_stack).
size * sizeof (fail_stack_elt_t),
\
+ (fail_stack).
avail * sizeof (fail_stack_elt_t),
\
min (emacs_re_max_failures * TYPICAL_FAILURE_SIZE, \
((fail_stack).size * FAIL_STACK_GROWTH_FACTOR)) \
* sizeof (fail_stack_elt_t)), \